package cn.yanxiaohui.service.web.pattern.template;

import cn.yanxiaohui.common.util.JacksonUtils;
import cn.yanxiaohui.service.web.pattern.factory.Factory;

import java.util.HashMap;
import java.util.Map;

public class Test {
    public static void main(String[] args) {
        try{
            Map<String,Object> params = new HashMap<String,Object>(0);
            params.put("code", "sbdy");
            params.put("amount", "41");
            params.put("userId", "sbdy");
            PayTemplate pay1 = Factory.getPayTemplate(1);
            Object result = pay1.pay(params);
            System.out.println(JacksonUtils.obj2json(result));
        } catch (Exception e){
            e.printStackTrace();
        }
    }
}
